home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 9
/
FM Towns Free Software Collection 9.iso
/
t_os
/
tool
/
cdlist
/
cdlist.bas
next >
Wrap
BASIC Source File
|
1994-11-16
|
34KB
|
927 lines
10 '
20 '<<<<< .CDLファイルエディタ >>>>>
30 '<<<<< CDLister V1.2 >>>>>
40 '<<<<< programed by KIM(Takefumi Kimura) 1994 >>>>>
50 '
60 *INIT
70 CLEAR:CLEAR,,,200000:CONSOLE 0,24,2
80 SCREEN 0:SCREEN@0:CLS
90 ON ERROR GOTO *E_TRAP
100 DIM TITLE$(10),ART$(10),LAB$(10),DT$(10),SN(10),TIF$(10),WRD$(10)
110 DIM TM$(10,99),SNAME$(10,99),PT1%(29000),PT3%(23000)
120 PLAYCD=0:VER$="1.2"
130 LOAD@"CDLVP.TIF"
140 SYMBOL(25,44),"CDLister V"+VER$+" by KIM",1,1,%6
150 OPEN "I",#1,"CDLVHIS.DAT"
160 LINE INPUT#1,FILE$
170 CLOSE
180 *MOUSE_INIT
190 MOUSE 0
200 MOUSE 1,320,240,1
210 '
220 GOSUB *LOAD
230 '
240 *MAIN
250 WHILE MOUSE(2,0)=0
260 A%=CDS%(5)
270 B%=CDS%(6):C%=CDS%(7)
280 IF PLAYCD=1 THEN
290 CDSTAT CDS%
300 IF A%<>CDS%(5) THEN
310 IF CDS%(5)=0 THEN GOSUB *CDSTOP:GOTO 380
320 PLAYCDN=CDS%(5):GOSUB *SYMBOL_PLAYCD
330 ENDIF
340 IF NOT(B%=CDS%(6) AND C%=CDS%(7)) THEN
350 STIMEM=CDS%(6):STIMES=CDS%(7):GOSUB *SYMBOL_STIME
360 ENDIF
370 ENDIF
380 WEND
390 MX=MOUSE(0):MY=MOUSE(1)
400 FOR Z=0 TO 1
410 IF MX>528+Z*48 AND MX<576+Z*48 AND MY>160 AND MY<176 THEN
420 MOUSE 1,,,0:ON Z+1 GOSUB *S_ROLL_U,*S_ROLL_D:MOUSE 1,,,1
430 ENDIF
440 IF MX>16+Z*48 AND MX<64+Z*48 AND MY>224 AND MY<240 THEN
450 MOUSE 1,,,0:ON Z+1 GOSUB *CDBACK,*CDNEXT:MOUSE 1,,,1
460 ENDIF
470 IF MX>16+Z*48 AND MX<64+Z*48 AND MY>240 AND MY<256 THEN
480 MOUSE 1,,,0:ON Z+1 GOSUB *CDREW,*CDFF:MOUSE 1,,,1
490 ENDIF
500 IF MX>272 AND MX<624 AND MY>40+Z*24 AND MY<64+Z*24 THEN
510 MOUSE 1,,,0:ON Z+1 GOSUB *EDIT_TITLE,*EDIT_ART:MOUSE 1,,,1
520 ENDIF
530 IF MX>272 AND MX<400 AND MY>88+Z*24 AND MY<112+Z*24 THEN
540 MOUSE 1,,,0:ON Z+1 GOSUB *EDIT_DT,*EDIT_TIF:MOUSE 1,,,1
550 ENDIF
560 IF MX>464 AND MX<624 AND MY>88+Z*24 AND MY<112+Z*24 THEN
570 MOUSE 1,,,0:ON Z+1 GOSUB *EDIT_LAB,*EDIT_WRD:MOUSE 1,,,1
580 ENDIF
590 NEXT
600 FOR Z=0 TO 11
610 IF Z+CS>SN(CCD) THEN 650
620 IF MX>224 AND MX<624 AND MY>176+Z*24 AND MY<200+Z*24 THEN
630 CES=Z:MOUSE 1,,,0:GOSUB *EDIT_SNAME:MOUSE 1,,,1
640 ENDIF
650 NEXT
660 IF MX>112 AND MX<160 AND MY>224 AND MY<248 THEN GOSUB *CDPLAY
670 IF MX>160 AND MX<200 AND MY>224 AND MY<248 THEN GOSUB *CDSTOP
680 IF MX>616 AND MX<641 AND MY>-1 AND MY<24 THEN GOSUB *EXIT
690 FOR Z=0 TO 4
700 IF MX>64+Z*80 AND MX<144+Z*80 AND MY>-1 AND MY<24 THEN
710 ON Z+1 GOSUB *TITLE_SELECT,*LOAD,*SAVE,*TITLE_SORT,*TITLE_ADD
720 ENDIF
730 NEXT
740 IF MX>-1 AND MX<64 AND MY>-1 AND MY<24 THEN GOSUB *COPYRIGHT
750 GOTO *MAIN
760 *DISPLAY_CT
770 LINE(130,116)-(208,132),PSET,0,BF
780 A1$=STR$(CCD):A2$=STR$(CDN)
790 SYMBOL(136,116),RIGHT$("000"+RIGHT$(A1$,LEN(A1$)-1),4)+"/"+RIGHT$("000"+RIGHT$(A2$,LEN(A2$)-1),4),1,1,%12
800 RETURN
810 *DISPLAY_CDDATA
820 FOR I=0 TO 1
830 LINE(276,44+24*I)-(616,60+24*I),PSET,%1,BF
840 LINE(276,92+24*I)-(392,108+24*I),PSET,%1,BF
850 LINE(472,92+24*I)-(616,108+24*I),PSET,%1,BF
860 NEXT
870 LINE(352,140)-(392,156),PSET,%1,BF
880 LINE(472,140)-(488,156),PSET,%1,BF
890 A3=0
900 FOR I=1 TO SN(CCD)
910 A1=VAL(LEFT$(TM$(CCD,I),2)):A2=VAL(RIGHT$(TM$(CCD,I),2))
920 A3=A3+A1*60+A2
930 NEXT
940 TM1$=STR$(INT(A3/60)):TM2$=STR$(A3 MOD 60)
950 TMCD$=RIGHT$("00"+RIGHT$(TM1$,LEN(TM1$)-1),2)+"'"+RIGHT$("00"+RIGHT$(TM2$,LEN(TM2$)-1),2)
960 SYMBOL(448-LEN(TITLE$(CCD))*4,44),TITLE$(CCD),1,1,7
970 SYMBOL(448-LEN(ART$(CCD))*4,68),ART$(CCD),1,1,7
980 SYMBOL(336-LEN(DT$(CCD))*4,92),DT$(CCD),1,1,7
990 SYMBOL(336-LEN(TIF$(CCD))*4,116),TIF$(CCD),1,1,7
1000 IF LEN(LAB$(CCD))>18 THEN A$=LEFT$(LAB$(CCD),18) ELSE A$=LAB$(CCD)
1010 SYMBOL(544-LEN(A$)*4,92),A$,1,1,7
1020 SYMBOL(544-LEN(WRD$(CCD))*4,116),WRD$(CCD),1,1,7
1030 SYMBOL(352,140),TMCD$,1,1,7
1040 SYMBOL(464,140),STR$(SN(CCD)),1,1,7
1050 RETURN
1060 *DISPLAY_SNAMES
1070 FOR I=0 TO 11
1080 LINE(226,180+I*24)-(622,196+I*24),PSET,%1,BF
1090 IF I+1>SN(CCD) THEN 1130
1100 SYMBOL(226-8,180+I*24),STR$(I+1),1,1,%6
1110 SYMBOL(412-LEN(SNAME$(CCD,I+1))*4,180+I*24),SNAME$(CCD,I+1),1,1,7
1120 SYMBOL(583,180+I*24),TM$(CCD,I+1),1,1,%7
1130 NEXT
1140 RETURN
1150 *LOAD
1160 CONNECT(145,23)-(145,1)-(223,1),%13
1170 CONNECT(146,23)-(223,23)-(223,2),%14
1180 WHILE MOUSE(2,0):WEND
1190 CONNECT(145,23)-(145,1)-(223,1),%14
1200 CONNECT(146,23)-(223,23)-(223,2),%13
1210 GOSUB *FILE_IP_P
1220 SYMBOL(144,200),".CDLファイル読込",1,1,7
1230 GOSUB *FILE_IP_L
1240 OPEN "I",#1,FILE$
1250 MOUSE 1,,,0
1260 INPUT#1,A$:BCDN=CDN:CDN=VAL(A$)
1270 IF CDN=0 THEN CDN=BCDN:GOTO 1580
1280 ERASE TITLE$,ART$,LAB$,DT$,SN,TIF$,WRD$,TM$,SNAME$
1290 DIM TITLE$(CDN),ART$(CDN),LAB$(CDN),DT$(CDN),SN(CDN),TIF$(CDN),WRD$(CDN)
1300 DIM TM$(CDN,99),SNAME$(CDN,99)
1310 GET@A(280,220)-(360,260),PT3%
1320 LINE(280,220)-(360,260),PSET,7,BF,%1
1330 SYMBOL(320,232),"0%",1,1,7
1340 FOR I=1 TO CDN
1350 INPUT#1,DUMMY$
1360 LINE INPUT#1,TITLE$(I)
1370 IF KRIGHT$(TITLE$(I),1)=" " THEN TITLE$(I)=KLEFT$(TITLE$(I),KLEN(TITLE$(I))-1):GOTO 1370
1380 LINE INPUT#1,ART$(I)
1390 IF KRIGHT$(ART$(I),1)=" " THEN ART$(I)=KLEFT$(ART$(I),KLEN(ART$(I))-1):GOTO 1390
1400 LINE INPUT#1,LAB$(I)
1410 IF KRIGHT$(LAB$(I),1)=" " THEN LAB$(I)=KLEFT$(LAB$(I),KLEN(LAB$(I))-1):GOTO 1410
1420 LINE INPUT#1,DT$(I)
1430 IF KRIGHT$(DT$(I),1)=" " THEN DT$(I)=KLEFT$(DT$(I),KLEN(DT$(I))-1):GOTO 1430
1440 INPUT#1,SN(I)
1450 LINE INPUT#1,TIF$(I)
1460 IF KRIGHT$(TIF$(I),1)=" " THEN TIF$(I)=KLEFT$(TIF$(I),KLEN(TIF$(I))-1):GOTO 1460
1470 LINE INPUT#1,WRD$(I)
1480 IF KRIGHT$(WRD$(I),1)=" " THEN WRD$(I)=KLEFT$(WRD$(I),KLEN(WRD$(I))-1):GOTO 1480
1490 FOR J=1 TO SN(I)
1500 LINE INPUT#1,TM$(I,J)
1510 LINE INPUT#1,SNAME$(I,J)
1520 IF KRIGHT$(SNAME$(I,J),1)=" " THEN SNAME$(I,J)=KLEFT$(SNAME$(I,J),KLEN(SNAME$(I,J))-1):GOTO 1520
1530 NEXT J
1540 LINE(304,232)-(336,248),PSET,%1,BF
1550 SYMBOL(304,232),RIGHT$(" "+STR$(INT(I/CDN*100)),3)+"%",1,1,7
1560 NEXT I
1570 PUT@A(280,220)-(360,260),PT3%
1580 CLOSE
1590 LINE(56,84)-(200,100),PSET,0,BF
1600 SYMBOL(56,84),LEFT$(FILE$+SPACE$(19),19),1,1,%12
1610 CCD=1:CLCD=CCD:CS=1
1620 GOSUB *DISPLAY_CT:GOSUB *DISPLAY_CDDATA
1630 GOSUB *DISPLAY_SNAMES
1640 MOUSE 1,,,1
1650 RETURN
1660 *FILE_IP_P
1670 GOSUB *WINDOW
1680 LINE(144,232)-(498,256),PSET,%13,BF
1690 IP_WX=152:IP_WY=236:IP_MAX=42:IP_CL=13:IP_NAME$=FILE$
1700 GOSUB *IP_SET
1710 RETURN
1720 *FILE_IP_L
1730 M=0
1740 WHILE M=0
1750 M=-MOUSE(2,0)-MOUSE(2,1)*2
1760 GOSUB *IP_MAIN
1770 WEND
1780 IF M=2 THEN PUT@A(128,128)-(512,352),PT3%:RETURN 1650
1790 MX=MOUSE(0):MY=MOUSE(1)
1800 GOSUB *W_CHECK_YN
1810 IF YN=1 THEN 1840
1820 IF YN=2 THEN PUT@A(128,128)-(512,352),PT3%:RETURN 1650
1830 GOTO *FILE_IP_L
1840 FILE$=IP_NAME$
1850 PUT@A(128,128)-(512,352),PT3%
1860 A$=RIGHT$(FILE$,4):IF A$<>".CDL" AND A$<>".cdl" AND A$=".BAK" AND A$=".bak" THEN FILE$=FILE$+".CDL"
1870 RETURN
1880 *S_ROLL_U
1890 CONNECT(529,175)-(529,161)-(575,161),%13
1900 CONNECT(530,175)-(575,175)-(575,162),%14
1910 IF CS=<1 THEN 1990
1920 CS=CS-1
1930 GET@A(224,176)-(624,440),PT1%
1940 PUT@A(224,200)-(624,464),PT1%
1950 LINE(226,180)-(622,196),PSET,%1,BF
1960 SYMBOL(226-8,180),STR$(CS),1,1,%6
1970 SYMBOL(412-LEN(SNAME$(CCD,CS))*4,180),SNAME$(CCD,CS),1,1,7
1980 SYMBOL(583,180),TM$(CCD,CS),1,1,%7
1990 CONNECT(529,175)-(529,161)-(575,161),%14
2000 CONNECT(530,175)-(575,175)-(575,162),%13
2010 RETURN
2020 *S_ROLL_D
2030 CONNECT(577,175)-(577,161)-(623,161),%13
2040 CONNECT(578,175)-(623,175)-(623,162),%14
2050 IF CS>=SN(CCD)-11 THEN 2130
2060 CS=CS+1
2070 GET@A(224,200)-(624,464),PT1%
2080 PUT@A(224,176)-(624,440),PT1%
2090 LINE(226,444)-(622,460),PSET,%1,BF
2100 SYMBOL(226-8,444),STR$(CS+11),1,1,%6
2110 SYMBOL(412-LEN(SNAME$(CCD,CS+11))*4,444),SNAME$(CCD,CS+11),1,1,7
2120 SYMBOL(583,444),TM$(CCD,CS+11),1,1,%7
2130 CONNECT(577,175)-(577,161)-(623,161),%14
2140 CONNECT(578,175)-(623,175)-(623,162),%13
2150 RETURN
2160 *TITLE_SELECT
2170 CONNECT(65,23)-(65,1)-(143,1),%13
2180 CONNECT(66,23)-(143,23)-(143,2),%14
2190 WHILE MOUSE(2,0):WEND
2200 CONNECT(65,23)-(65,1)-(143,1),%14
2210 CONNECT(66,23)-(143,23)-(143,2),%13
2220 GET@A(128,128)-(512,352),PT3%
2230 GOSUB *WINDOW_S
2240 SYMBOL(144,136),"タイトル選択",1,1,7,,,1
2250 FOR I=0 TO 6
2260 J=I+CLCD
2270 IF J>CDN THEN I=6:GOTO 2290
2280 SYMBOL(320-LEN(TITLE$(J))*4,172+I*24),TITLE$(J),1,1,7
2290 NEXT
2300 M=0
2310 WHILE M=0
2320 M=-MOUSE(2,0)-MOUSE(2,1)*2
2330 WEND
2340 IF M=2 THEN PUT@A(128,128)-(512,352),PT3%:RETURN
2350 MX=MOUSE(0):MY=MOUSE(1)
2360 FOR I=0 TO 1
2370 IF MX>400+I*48 AND MX<448+I*48 AND MY>152 AND MY<168 THEN
2380 ON I+1 GOSUB *T_ROLL_U,*T_ROLL_D
2390 ENDIF
2400 NEXT
2410 FOR I=0 TO 6
2420 IF I+CLCD>CDN THEN I=6:GOTO 2290
2430 IF MX>144 AND MX<496 AND MY>168+I*24 AND MY<192+I*24 THEN
2440 K=I:I=6:NEXT:GOTO 2480
2450 ENDIF
2460 NEXT
2470 GOTO 2300
2480 CONNECT(145,191+K*24)-(145,169+K*24)-(495,169+K*24),%13
2490 CONNECT(146,191+K*24)-(495,191+K*24)-(495,170+K*24),%14
2500 WHILE MOUSE(2,0):WEND
2510 PUT@A(128,128)-(512,352),PT3%
2520 CCD=CLCD+K:CS=1
2530 GOSUB *DISPLAY_CT:GOSUB *DISPLAY_CDDATA
2540 GOSUB *DISPLAY_SNAMES
2550 RETURN
2560 *TITLE_SORT
2570 IF CDN<1 THEN RETURN
2580 DIM BTITLE$(CDN),BART$(CDN),BLAB$(CDN),BDT$(CDN),BSN(CDN),BTIF$(CDN),BWRD$(CDN)
2590 DIM BTM$(CDN,99),BSNAME$(CDN,99),TSRT(CDN),NN(CDN)
2600 SORT=1:CLCD=1
2610 CONNECT(305,23)-(305,1)-(383,1),%13
2620 CONNECT(306,23)-(383,23)-(383,2),%14
2630 WHILE MOUSE(2,0):WEND
2640 CONNECT(305,23)-(305,1)-(383,1),%14
2650 CONNECT(306,23)-(383,23)-(383,2),%13
2660 GET@A(128,128)-(512,352),PT3%
2670 GOSUB *WINDOW_S
2680 SYMBOL(144,136),"タイトル並び換え",1,1,7,,,1
2690 FOR I=0 TO 6
2700 J=I+CLCD
2710 IF J>CDN THEN I=6:GOTO 2730
2720 SYMBOL(320-LEN(TITLE$(J))*4,172+I*24),TITLE$(J),1,1,7
2730 NEXT
2740 FOR J=1 TO CDN
2750 BTITLE$(J)=TITLE$(J):BART$(J)=ART$(J):BLAB$(J)=LAB$(J)
2760 BDT$(J)=DT$(J):BSN(J)=SN(J):BTIF$(J)=TIF$(J):BWRD$(J)=WRD$(J)
2770 FOR L=1 TO SN(J)
2780 BTM$(J,L)=TM$(J,L):BSNAME$(J,L)=SNAME$(J,L)
2790 NEXT
2800 LINE(280,136)-(500,152),PSET,%1,BF
2810 SYMBOL(280,136),AKCNV$(STR$(J))+"番目",1,1,%7
2820 M=0
2830 WHILE M=0
2840 M=-MOUSE(2,0)-MOUSE(2,1)*2
2850 WEND
2860 IF M=2 THEN PUT@A(128,128)-(512,352),PT3%:GOTO 3300
2870 MX=MOUSE(0):MY=MOUSE(1)
2880 FOR I=0 TO 1
2890 IF MX>400+I*48 AND MX<448+I*48 AND MY>152 AND MY<168 THEN
2900 ON I+1 GOSUB *T_ROLL_U,*T_ROLL_D
2910 ENDIF
2920 NEXT
2930 FOR I=0 TO 6
2940 IF I+CLCD>CDN THEN I=6:GOTO 2990
2950 IF TSRT(I+CLCD)=1 THEN 2990
2960 IF MX>144 AND MX<496 AND MY>168+I*24 AND MY<192+I*24 THEN
2970 K=I:I=6:NEXT:GOTO 3010
2980 ENDIF
2990 NEXT
3000 GOTO 2820
3010 CONNECT(145,191+K*24)-(145,169+K*24)-(495,169+K*24),%13
3020 CONNECT(146,191+K*24)-(495,191+K*24)-(495,170+K*24),%14
3030 WHILE MOUSE(2,0):WEND
3040 TSRT(K+CLCD)=1:NN(J)=K+CLCD
3050 CONNECT(145,191+K*24)-(145,169+K*24)-(495,169+K*24),%14
3060 CONNECT(146,191+K*24)-(495,191+K*24)-(495,170+K*24),%13
3070 SYMBOL(320-LEN(TITLE$(K+CLCD))*4,172+K*24),TITLE$(K+CLCD),1,1,2
3080 NEXT
3090 PUT@A(128,128)-(512,352),PT3%
3100 GOSUB *WINDOW
3110 SYMBOL(235,232),"これでいいですか?",1,1,7
3120 M=0
3130 WHILE M=0
3140 M=-MOUSE(2,0)-MOUSE(2,1)*2
3150 WEND
3160 IF M=2 THEN PUT@A(128,128)-(512,352),PT3%:GOTO 3300
3170 GOSUB *W_CHECK_YN
3180 IF YN=1 THEN 3200
3190 IF YN=2 THEN PUT@A(128,128)-(512,352),PT3%:GOTO 3300 ELSE 3120
3200 PUT@A(128,128)-(512,352),PT3%
3210 FOR I=1 TO CDN:J=NN(I)
3220 TITLE$(I)=BTITLE$(J):ART$(I)=BART$(J):LAB$(I)=BLAB$(J)
3230 DT$(I)=BDT$(J):SN(I)=BSN(J):TIF$(I)=BTIF$(J):WRD$(I)=BWRD$(J)
3240 FOR L=1 TO SN(I)
3250 TM$(I,L)=BTM$(J,L):SNAME$(I,L)=BSNAME$(J,L)
3260 NEXT L,I
3270 CCD=1:CLCD=CCD:CS=1
3280 GOSUB *DISPLAY_CT:GOSUB *DISPLAY_CDDATA
3290 GOSUB *DISPLAY_SNAMES
3300 ERASE TSRT,NN
3310 ERASE BTITLE$,BART$,BLAB$,BDT$,BSN,BTIF$,BWRD$,BTM$,BSNAME$
3320 SORT=0
3330 RETURN
3340 *T_ROLL_U
3350 CONNECT(401,167)-(401,153)-(447,153),%13
3360 CONNECT(402,167)-(447,167)-(447,154),%14
3370 IF CLCD=<1 THEN 3460
3380 CLCD=CLCD-1
3390 GET@A(144,168)-(496,312),PT1%
3400 PUT@A(144,192)-(496,336),PT1%
3410 LINE(146,172)-(494,188),PSET,%1,BF
3420 IF SORT=0 THEN 3450
3430 IF TSRT(CLCD)=0 THEN 3450
3440 SYMBOL(320-LEN(TITLE$(CLCD))*4,172),TITLE$(CLCD),1,1,2:GOTO 3460
3450 SYMBOL(320-LEN(TITLE$(CLCD))*4,172),TITLE$(CLCD),1,1,7
3460 CONNECT(401,167)-(401,153)-(447,153),%14
3470 CONNECT(402,167)-(447,167)-(447,154),%13
3480 RETURN
3490 *T_ROLL_D
3500 CONNECT(449,167)-(449,153)-(495,153),%13
3510 CONNECT(450,167)-(495,167)-(495,154),%14
3520 IF CLCD>=CDN-6 THEN 3610
3530 CLCD=CLCD+1
3540 GET@A(144,192)-(496,336),PT1%
3550 PUT@A(144,168)-(496,312),PT1%
3560 LINE(146,316)-(494,332),PSET,%1,BF
3570 IF SORT=0 THEN 3600
3580 IF TSRT(CLCD+6)=0 THEN 3600
3590 SYMBOL(320-LEN(TITLE$(CLCD+6))*4,316),TITLE$(CLCD+6),1,1,2:GOTO 3610
3600 SYMBOL(320-LEN(TITLE$(CLCD+6))*4,316),TITLE$(CLCD+6),1,1,7
3610 CONNECT(449,167)-(449,153)-(495,153),%14
3620 CONNECT(450,167)-(495,167)-(495,154),%13
3630 RETURN
3640 *TITLE_ADD
3650 IF CDN<1 THEN RETURN
3660 DIM BTITLE$(CDN),BART$(CDN),BLAB$(CDN),BDT$(CDN),BSN(CDN),BTIF$(CDN),BWRD$(CDN)
3670 DIM BTM$(CDN,99),BSNAME$(CDN,99)
3680 CONNECT(385,23)-(385,1)-(463,1),%13
3690 CONNECT(386,23)-(463,23)-(463,2),%14
3700 WHILE MOUSE(2,0):WEND
3710 CONNECT(385,23)-(385,1)-(463,1),%14
3720 CONNECT(386,23)-(463,23)-(463,2),%13
3730 GET@A(128,128)-(512,352),PT3%
3740 GOSUB *WINDOW
3750 SYMBOL(144,200),"タイトル新規追加",1,1,7,,,1
3760 SYMBOL(185,232),"登録したいCDをドライブに入れて!",1,1,7
3770 IF PLAYCD=1 OR PLAYCD=2 THEN CD STOP
3780 M=0
3790 WHILE M=0
3800 M=-MOUSE(2,0)-MOUSE(2,1)*2
3810 WEND
3820 IF M=2 THEN PUT@A(128,128)-(512,352),PT3%:GOTO 4210
3830 GOSUB *W_CHECK_YN
3840 IF YN=1 THEN 3860
3850 IF YN=2 THEN PUT@A(128,128)-(512,352),PT3%:GOTO 4210 ELSE 3780
3860 PUT@A(128,128)-(512,352),PT3%
3870 CDINF CDF%
3880 FOR I=1 TO CDN
3890 BTITLE$(I)=TITLE$(I):BART$(I)=ART$(I):BLAB$(I)=LAB$(I)
3900 BDT$(I)=DT$(I):BSN(I)=SN(I):BTIF$(I)=TIF$(I):BWRD$(I)=WRD$(I)
3910 FOR L=1 TO SN(I)
3920 BTM$(I,L)=TM$(I,L):BSNAME$(I,L)=SNAME$(I,L)
3930 NEXT L,I
3940 CDN=CDN+1
3950 ERASE TITLE$,ART$,LAB$,DT$,SN,TIF$,WRD$,TM$,SNAME$
3960 DIM TITLE$(CDN),ART$(CDN),LAB$(CDN),DT$(CDN),SN(CDN),TIF$(CDN),WRD$(CDN)
3970 DIM TM$(CDN,99),SNAME$(CDN,99)
3980 FOR I=1 TO CDN-1
3990 TITLE$(I)=BTITLE$(I):ART$(I)=BART$(I):LAB$(I)=BLAB$(I)
4000 DT$(I)=BDT$(I):SN(I)=BSN(I):TIF$(I)=BTIF$(I):WRD$(I)=BWRD$(I)
4010 FOR L=1 TO SN(I)
4020 TM$(I,L)=BTM$(I,L):SNAME$(I,L)=BSNAME$(I,L)
4030 NEXT L,I
4040 SN(CDN)=CDF%(5)
4050 FOR I=1 TO SN(CDN)
4060 IF I=SN(CDN) THEN
4070 A1=CDF%(2)-VAL(LEFT$(CDSTIME$(I),2))
4080 A2=CDF%(3)-VAL(MID$(CDSTIME$(I),4,2))
4090 A21=CDF%(4)-VAL(RIGHT$(CDSTIME$(I),2)):GOTO 4140
4100 ENDIF
4110 A1=VAL(LEFT$(CDSTIME$(I+1),2))-VAL(LEFT$(CDSTIME$(I),2))
4120 A2=VAL(MID$(CDSTIME$(I+1),4,2))-VAL(MID$(CDSTIME$(I),4,2))
4130 A21=VAL(RIGHT$(CDSTIME$(I+1),2))-VAL(RIGHT$(CDSTIME$(I),2))
4140 A3=INT(A1*60+A2+A21/75)
4150 TM1$=STR$(INT(A3/60)):TM2$=STR$(A3 MOD 60)
4160 TM$(CDN,I)=RIGHT$("00"+RIGHT$(TM1$,LEN(TM1$)-1),2)+"'"+RIGHT$("00"+RIGHT$(TM2$,LEN(TM2$)-1),2)
4170 NEXT
4180 CCD=CDN:CLCD=1:CS=1
4190 GOSUB *DISPLAY_CT:GOSUB *DISPLAY_CDDATA
4200 GOSUB *DISPLAY_SNAMES
4210 ERASE BTITLE$,BART$,BLAB$,BDT$,BSN,BTIF$,BWRD$,BTM$,BSNAME$
4220 RETURN
4230 *EDIT_TITLE
4240 CONNECT(273,63)-(273,41)-(623,41),%13
4250 CONNECT(274,63)-(623,63)-(623,42),%14
4260 IP_WX=280:IP_WY=44:IP_MAX=42:IP_CL=1:IP_NAME$=TITLE$(CCD):A$=TITLE$(CCD)
4270 GOSUB *IP_SET
4280 WHILE IP_CK$<>CHR$(&HD) AND IP_CK$<>CHR$(&H1E) AND IP_CK$<>CHR$(&H1F) AND IP_CK$<>CHR$(24) AND IP_CK$<>CHR$(27)
4290 GOSUB *IP_MAIN:WEND
4300 GOSUB *IP_END
4310 TITLE$(CCD)=IP_NAME$
4320 IF IP_CK$=CHR$(24) OR IP_CK$=CHR$(27) THEN TITLE$(CCD)=A$
4330 CONNECT(273,63)-(273,41)-(623,41),%14
4340 CONNECT(274,63)-(623,63)-(623,42),%13
4350 LINE(274,42)-(622,62),PSET,%1,BF
4360 SYMBOL(448-LEN(TITLE$(CCD))*4,44),TITLE$(CCD),1,1,7
4370 IF IP_CK$=CHR$(&H1F) THEN GOTO *EDIT_ART
4380 RETURN
4390 *EDIT_ART
4400 CONNECT(273,87)-(273,65)-(623,65),%13
4410 CONNECT(274,87)-(623,87)-(623,66),%14
4420 IP_WX=280:IP_WY=68:IP_MAX=42:IP_CL=1:IP_NAME$=ART$(CCD):A$=ART$(CCD)
4430 GOSUB *IP_SET
4440 WHILE IP_CK$<>CHR$(&HD) AND IP_CK$<>CHR$(&H1E) AND IP_CK$<>CHR$(&H1F) AND IP_CK$<>CHR$(24) AND IP_CK$<>CHR$(27)
4450 GOSUB *IP_MAIN:WEND
4460 GOSUB *IP_END
4470 ART$(CCD)=IP_NAME$
4480 IF IP_CK$=CHR$(24) OR IP_CK$=CHR$(27) THEN ART$(CCD)=A$
4490 CONNECT(273,87)-(273,65)-(623,65),%14
4500 CONNECT(274,87)-(623,87)-(623,66),%13
4510 LINE(274,66)-(622,86),PSET,%1,BF
4520 SYMBOL(448-LEN(ART$(CCD))*4,68),ART$(CCD),1,1,7
4530 IF IP_CK$=CHR$(&H1E) THEN GOTO *EDIT_TITLE
4540 IF IP_CK$=CHR$(&H1F) THEN GOTO *EDIT_DT
4550 RETURN
4560 *EDIT_DT
4570 CONNECT(273,111)-(273,89)-(399,89),%13
4580 CONNECT(274,111)-(399,111)-(399,90),%14
4590 IP_WX=280:IP_WY=92:IP_MAX=10:IP_CL=1:IP_NAME$=DT$(CCD):A$=DT$(CCD)
4600 LINE(274,90)-(398,110),PSET,%1,BF
4610 GOSUB *IP_SET
4620 WHILE IP_CK$<>CHR$(&HD) AND IP_CK$<>CHR$(&H1E) AND IP_CK$<>CHR$(&H1F) AND IP_CK$<>CHR$(24) AND IP_CK$<>CHR$(27)
4630 GOSUB *IP_MAIN:WEND
4640 GOSUB *IP_END
4650 DT$(CCD)=IP_NAME$
4660 IF IP_CK$=CHR$(24) OR IP_CK$=CHR$(27) THEN DT$(CCD)=A$
4670 CONNECT(273,111)-(273,89)-(399,89),%14
4680 CONNECT(274,111)-(399,111)-(399,90),%13
4690 LINE(274,90)-(398,110),PSET,%1,BF
4700 SYMBOL(336-LEN(DT$(CCD))*4,92),DT$(CCD),1,1,7
4710 IF IP_CK$=CHR$(&H1E) THEN GOTO *EDIT_ART
4720 IF IP_CK$=CHR$(&H1F) THEN GOTO *EDIT_LAB
4730 RETURN
4740 *EDIT_TIF
4750 CONNECT(273,135)-(273,113)-(399,113),%13
4760 CONNECT(274,135)-(399,135)-(399,114),%14
4770 IP_WX=280:IP_WY=116:IP_MAX=8:IP_CL=1:IP_NAME$=TIF$(CCD):A$=TIF$(CCD)
4780 LINE(274,114)-(398,134),PSET,%1,BF
4790 GOSUB *IP_SET
4800 WHILE IP_CK$<>CHR$(&HD) AND IP_CK$<>CHR$(&H1E) AND IP_CK$<>CHR$(&H1F) AND IP_CK$<>CHR$(24) AND IP_CK$<>CHR$(27)
4810 GOSUB *IP_MAIN:WEND
4820 GOSUB *IP_END
4830 TIF$(CCD)=IP_NAME$
4840 IF IP_CK$=CHR$(24) OR IP_CK$=CHR$(27) THEN TIF$(CCD)=A$
4850 CONNECT(273,135)-(273,113)-(399,113),%14
4860 CONNECT(274,135)-(399,135)-(399,114),%13
4870 LINE(274,114)-(398,134),PSET,%1,BF
4880 SYMBOL(336-LEN(TIF$(CCD))*4,116),TIF$(CCD),1,1,7
4890 IF IP_CK$=CHR$(&H1E) THEN GOTO *EDIT_LAB
4900 IF IP_CK$=CHR$(&H1F) THEN GOTO *EDIT_WRD
4910 RETURN
4920 *EDIT_LAB
4930 GET@A(274,89)-(623,111),PT3%
4940 LINE(274,89)-(623,111),PSET,7,BF,%1
4950 IP_WX=280:IP_WY=92:IP_MAX=42:IP_CL=1:IP_NAME$=LAB$(CCD):A$=LAB$(CCD)
4960 GOSUB *IP_SET
4970 WHILE IP_CK$<>CHR$(&HD) AND IP_CK$<>CHR$(&H1E) AND IP_CK$<>CHR$(&H1F) AND IP_CK$<>CHR$(24) AND IP_CK$<>CHR$(27)
4980 GOSUB *IP_MAIN:WEND
4990 GOSUB *IP_END
5000 LAB$(CCD)=IP_NAME$
5010 IF IP_CK$=CHR$(24) OR IP_CK$=CHR$(27) THEN LAB$(CCD)=A$
5020 PUT@A(274,89)-(623,111),PT3%
5030 LINE(466,90)-(622,110),PSET,%1,BF
5040 IF LEN(LAB$(CCD))>18 THEN A$=LEFT$(LAB$(CCD),18) ELSE A$=LAB$(CCD)
5050 SYMBOL(544-LEN(A$)*4,92),A$,1,1,7
5060 IF IP_CK$=CHR$(&H1E) THEN GOTO *EDIT_DT
5070 IF IP_CK$=CHR$(&H1F) THEN GOTO *EDIT_TIF
5080 RETURN
5090 *EDIT_WRD
5100 CONNECT(465,135)-(465,113)-(623,113),%13
5110 CONNECT(466,135)-(623,135)-(623,114),%14
5120 IP_WX=472:IP_WY=116:IP_MAX=6:IP_CL=1:IP_NAME$=WRD$(CCD):A$=WRD$(CCD)
5130 LINE(466,114)-(622,134),PSET,%1,BF
5140 GOSUB *IP_SET
5150 WHILE IP_CK$<>CHR$(&HD) AND IP_CK$<>CHR$(&H1E) AND IP_CK$<>CHR$(&H1F) AND IP_CK$<>CHR$(24) AND IP_CK$<>CHR$(27)
5160 GOSUB *IP_MAIN:WEND
5170 GOSUB *IP_END
5180 WRD$(CCD)=IP_NAME$
5190 IF IP_CK$=CHR$(24) OR IP_CK$=CHR$(27) THEN WRD$(CCD)=A$
5200 CONNECT(465,135)-(465,113)-(623,113),%14
5210 CONNECT(466,135)-(623,135)-(623,114),%13
5220 LINE(466,114)-(622,134),PSET,%1,BF
5230 SYMBOL(544-LEN(WRD$(CCD))*4,116),WRD$(CCD),1,1,7
5240 IF IP_CK$=CHR$(&H1E) THEN GOTO *EDIT_TIF
5250 IF IP_CK$=CHR$(&H1F) THEN CES=0:GOTO *EDIT_SNAME
5260 RETURN
5270 *EDIT_SNAME
5280 CONNECT(225,199+CES*24)-(225,177+CES*24)-(623,177+CES*24),%13
5290 CONNECT(226,199+CES*24)-(623,199+CES*24)-(623,178+CES*24),%14
5300 IP_WX=244:IP_WY=180+CES*24:IP_MAX=42:IP_CL=1
5310 IP_NAME$=SNAME$(CCD,CS+CES):A$=SNAME$(CCD,CS+CES)
5320 GOSUB *IP_SET
5330 WHILE IP_CK$<>CHR$(&HD) AND IP_CK$<>CHR$(&H1E) AND IP_CK$<>CHR$(&H1F) AND IP_CK$<>CHR$(24) AND IP_CK$<>CHR$(27)
5340 GOSUB *IP_MAIN:WEND
5350 GOSUB *IP_END
5360 SNAME$(CCD,CS+CES)=IP_NAME$
5370 IF IP_CK$=CHR$(24) OR IP_CK$=CHR$(27) THEN SNAME$(CCD,CS+CES)=A$
5380 CONNECT(225,199+CES*24)-(225,177+CES*24)-(623,177+CES*24),%14
5390 CONNECT(226,199+CES*24)-(623,199+CES*24)-(623,178+CES*24),%13
5400 LINE(244,178+CES*24)-(580,198+CES*24),PSET,%1,BF
5410 SYMBOL(412-LEN(SNAME$(CCD,CS+CES))*4,180+CES*24),SNAME$(CCD,CS+CES),1,1,7
5420 IF IP_CK$=CHR$(&H1E) THEN
5430 IF CES>0 THEN CES=CES-1:GOTO *EDIT_SNAME
5440 IF CS+CES>1 THEN GOSUB *S_ROLL_U:GOTO *EDIT_SNAME
5450 GOTO *EDIT_WRD
5460 ENDIF
5470 IF IP_CK$=CHR$(&H1F) THEN
5480 IF CES<11 AND CES<SN(CCD)-1 THEN CES=CES+1:GOTO *EDIT_SNAME
5490 IF CS+CES<SN(CCD) THEN GOSUB *S_ROLL_D:GOTO *EDIT_SNAME
5500 ENDIF
5510 RETURN
5520 *SAVE
5530 CONNECT(225,23)-(225,1)-(303,1),%13
5540 CONNECT(226,23)-(303,23)-(303,2),%14
5550 IF CDN=0 THEN RETURN
5560 WHILE MOUSE(2,0):WEND
5570 KILF=0
5580 CONNECT(225,23)-(225,1)-(303,1),%14
5590 CONNECT(226,23)-(303,23)-(303,2),%13
5600 GOSUB *FILE_IP_P
5610 SYMBOL(144,200),".CDLファイル保存",1,1,7
5620 GOSUB *FILE_IP_L
5630 IF KILF=1 THEN KILL FILE$
5640 OPEN "O",#1,FILE$
5650 MOUSE 1,,,0
5660 A$=STR$(CDN):A$=RIGHT$("00000"+RIGHT$(A$,LEN(A$)-1),5)
5670 PRINT#1,A$
5680 GET@A(280,220)-(360,260),PT3%
5690 LINE(280,220)-(360,260),PSET,7,BF,%1
5700 SYMBOL(320,232),"0%",1,1,7
5710 FOR I=1 TO CDN
5720 PRINT#1,"##"
5730 PRINT#1,LEFT$(TITLE$(I)+SPACE$(42),42)
5740 PRINT#1,LEFT$(ART$(I)+SPACE$(42),42)
5750 PRINT#1,LEFT$(LAB$(I)+SPACE$(42),42)
5760 PRINT#1,LEFT$(DT$(I)+SPACE$(10),10)
5770 PRINT#1,RIGHT$(STR$(SN(I)),2)
5780 PRINT#1,LEFT$(TIF$(I)+SPACE$(8),8)
5790 PRINT#1,LEFT$(WRD$(I)+SPACE$(6),6)
5800 FOR J=1 TO SN(I)
5810 PRINT#1,TM$(I,J)
5820 PRINT#1,LEFT$(SNAME$(I,J)+SPACE$(42),42)
5830 NEXT J
5840 LINE(304,232)-(336,248),PSET,%1,BF
5850 SYMBOL(304,232),RIGHT$(" "+STR$(INT(I/CDN*100)),3)+"%",1,1,7
5860 NEXT I
5870 PUT@A(280,220)-(360,260),PT3%
5880 CLOSE:MOUSE 1,,,1
5890 RETURN
5900 *COPYRIGHT
5910 WHILE MOUSE(2,0):WEND
5920 GET@A(128,128)-(512,352),PT3%
5930 LINE(128,176)-(512,305),PSET,7,BF,%1
5940 MOUSE 1,,,0
5950 SYMBOL(192,200),".CDLファイルエディタ",1,1,7
5960 SYMBOL(220,225),"CDLister Ver."+VER$,1,1,%6
5970 SYMBOL(240,260),"Copyright (c) KIM 1994.",1,1,7
5980 WHILE MOUSE(2,0)=0 AND MOUSE(2,1)=0:WEND
5990 PUT@A(128,128)-(512,352),PT3%
6000 MOUSE 1,,,1
6010 RETURN
6020 *EXIT
6030 CONNECT(617,23)-(617,1)-(639,1),%13
6040 CONNECT(618,23)-(639,23)-(639,2),%14
6050 WHILE MOUSE(2,0):WEND
6060 CONNECT(617,23)-(617,1)-(639,1),%14
6070 CONNECT(618,23)-(639,23)-(639,2),%13
6080 GOSUB *WINDOW
6090 SYMBOL(272,232),"終了します",1,1,7
6100 M=0
6110 WHILE M=0
6120 M=-MOUSE(2,0)-MOUSE(2,1)*2
6130 WEND
6140 IF M=2 THEN PUT@A(128,128)-(512,352),PT3%:RETURN *MAIN
6150 GOSUB *W_CHECK_YN
6160 IF YN=1 THEN
6170 MOUSE 5
6180 PUT@A(128,128)-(512,352),PT3%
6190 IF PLAYCD=1 OR PLAYCD=2 THEN CD STOP
6200 KILL"CDLVHIS.DAT"
6210 OPEN "O",#1,"CDLVHIS.DAT"
6220 PRINT#1,FILE$
6230 CLOSE
6240 END
6250 ENDIF
6260 IF YN=2 THEN PUT@A(128,128)-(512,352),PT3%:RETURN *MAIN
6270 GOTO 6100
6280 *WINDOW_S
6290 WINDOW(0,0)-(639-128,479-128):VIEW(128,128)-(639,479)
6300 LINE(0,0)-(384,224),PSET,7,BF,%1
6310 FOR I=0 TO 6
6320 LINE(16,40+I*24)-(368,64+I*24),PSET,%13,B
6330 CONNECT(17,63+I*24)-(17,41+I*24)-(367,41+I*24),%14
6340 CONNECT(18,63+I*24)-(367,63+I*24)-(367,42+I*24),%13
6350 NEXT
6360 FOR I=0 TO 1
6370 LINE(272+I*48,24)-(320+I*48,40),PSET,%13,B
6380 CONNECT(273+I*48,39)-(273+I*48,25)-(319+I*48,25),%14
6390 CONNECT(274+I*48,39)-(319+I*48,39)-(319+I*48,26),%13
6400 NEXT
6410 SYMBOL(294,29),"▲",.5!,.5!,%11
6420 SYMBOL(294+48,29),"▼",.5!,.5!,%11
6430 WINDOW:VIEW
6440 RETURN
6450 *WINDOW
6460 GET@A(128,128)-(512,352),PT3%
6470 LINE(128,192)-(512,289),PSET,7,BF,%1
6480 FOR I=0 TO 1
6490 LINE(408+I*48,256)-(456+I*48,280),PSET,%13,B
6500 CONNECT(409+I*48,279)-(409+I*48,257)-(455+I*48,257),%14
6510 CONNECT(410+I*48,279)-(455+I*48,279)-(455+I*48,258),%13
6520 NEXT
6530 SYMBOL(416,260),"実行",1,1,7
6540 SYMBOL(464,260),"取消",1,1,7
6550 RETURN
6560 *W_CHECK_YN
6570 MX=MOUSE(0):MY=MOUSE(1)
6580 YN=0
6590 FOR I=0 TO 1
6600 IF MX>408+I*48 AND MX<456+I*48 AND MY>256 AND MY<280 THEN
6610 CONNECT(409+I*48,279)-(409+I*48,257)-(455+I*48,257),%13
6620 CONNECT(410+I*48,279)-(455+I*48,279)-(455+I*48,258),%14
6630 YN=I+1
6640 ENDIF
6650 NEXT
6660 WHILE MOUSE(2,0):WEND
6670 RETURN
6680 *CDPLAY
6690 CONNECT(113,247)-(113,225)-(159,225),%13
6700 CONNECT(114,247)-(159,247)-(159,226),%14
6710 IF PLAYCD=1 THEN PLAYCD=2:CD PAUSE:GOTO 6790
6720 IF PLAYCD=2 THEN PLAYCD=1:CD CONT:GOTO 6790
6730 CDINF CDF%
6740 IF CDF%(1)=2 THEN GOTO 6790 ELSE IF CDF%(1)=3 THEN PLAYCDF=2 ELSE PLAYCDF=1
6750 PLAYCD=1
6760 PLAYCDN=PLAYCDF
6770 CD PLAY PLAYCDN,CDF%(5)
6780 GOSUB *SYMBOL_PLAYCD
6790 WHILE MOUSE(2,0):WEND
6800 CONNECT(113,247)-(113,225)-(159,225),%14
6810 CONNECT(114,247)-(159,247)-(159,226),%13
6820 RETURN
6830 *SYMBOL_PLAYCD
6840 LINE(120,252)-(136,268),PSET,0,BF
6850 SYMBOL(112,252),STR$(PLAYCDN),1,1,%12
6860 RETURN
6870 *SYMBOL_STIME
6880 LINE(144,252)-(184,268),PSET,0,BF
6890 TM1$=STR$(STIMEM):TM2$=STR$(STIMES)
6900 SYMBOL(144,252),RIGHT$("00"+RIGHT$(TM1$,LEN(TM1$)-1),2)+"'"+RIGHT$("00"+RIGHT$(TM2$,LEN(TM2$)-1),2),1,1,%12
6910 RETURN
6920 *CDSTOP
6930 CONNECT(161,247)-(161,225)-(199,225),%13
6940 CONNECT(162,247)-(199,247)-(199,226),%14
6950 IF PLAYCD=0 THEN 6990
6960 CD STOP
6970 PLAYCD=0
6980 LINE(120,252)-(184,268),PSET,0,BF
6990 WHILE MOUSE(2,0):WEND
7000 CONNECT(161,247)-(161,225)-(199,225),%14
7010 CONNECT(162,247)-(199,247)-(199,226),%13
7020 RETURN
7030 *CDBACK
7040 CONNECT(17,239)-(17,225)-(63,225),%13
7050 CONNECT(18,239)-(63,239)-(63,226),%14
7060 IF PLAYCD=0 THEN 7130
7070 PLAYCD=1:A=0
7080 IF (CDS%(7)<2 OR A>0) AND PLAYCDN>PLAYCDF THEN PLAYCDN=PLAYCDN-1
7090 GOSUB *SYMBOL_PLAYCD:A=A+1
7100 WAIT 20
7110 IF MOUSE(2,0) THEN 7080
7120 CD PLAY PLAYCDN,CDF%(5)
7130 CONNECT(17,239)-(17,225)-(63,225),%14
7140 CONNECT(18,239)-(63,239)-(63,226),%13
7150 RETURN
7160 *CDNEXT
7170 CONNECT(65,239)-(65,225)-(111,225),%13
7180 CONNECT(66,239)-(111,239)-(111,226),%14
7190 IF PLAYCD=0 OR PLAYCDN>=CDF%(5) THEN 7260
7200 PLAYCD=1
7210 PLAYCDN=PLAYCDN+1
7220 GOSUB *SYMBOL_PLAYCD
7230 WAIT 20
7240 IF MOUSE(2,0) THEN 7210
7250 CD PLAY PLAYCDN,CDF%(5)
7260 CONNECT(65,239)-(65,225)-(111,225),%14
7270 CONNECT(66,239)-(111,239)-(111,226),%13
7280 RETURN
7290 *CDREW
7300 CONNECT(17,255)-(17,241)-(63,241),%13
7310 CONNECT(18,255)-(63,255)-(63,242),%14
7320 IF PLAYCD=0 THEN 7630
7330 PLAYCD=1
7340 CDTIMEM=CDS%(2):CDTIMES=CDS%(3)
7350 A1=VAL(LEFT$(CDSTIME$(PLAYCDF),2))
7360 A2=VAL(MID$(CDSTIME$(PLAYCDF),4,2))
7370 IF NOT(CDTIMEM=A1 AND CDTIMES=A2) THEN
7380 IF CDTIMES=0 THEN
7390 CDTIMEM=CDTIMEM-1:CDTIMES=59
7400 ELSE
7410 CDTIMES=CDTIMES-1
7420 ENDIF
7430 A3=VAL(LEFT$(CDSTIME$(PLAYCDN),2))
7440 A4=VAL(MID$(CDSTIME$(PLAYCDN),4,2))
7450 IF NOT(CDTIMEM*60+CDTIMES<A3*60+A4) THEN
7460 IF STIMES=0 THEN
7470 STIMEM=STIMEM-1:STIMES=59
7480 ELSE
7490 STIMES=STIMES-1
7500 ENDIF
7510 ELSE
7520 A5=VAL(LEFT$(CDSTIME$(PLAYCDN-1),2))
7530 A6=VAL(MID$(CDSTIME$(PLAYCDN-1),4,2))
7540 A7=(A3-A5)*60+(A4-A6)-1
7550 STIMEM=INT(A7/60):STIMES=(A7 MOD 60)
7560 PLAYCDN=PLAYCDN-1:CDS%(5)=PLAYCDN:GOSUB *SYMBOL_PLAYCD
7570 ENDIF
7580 ENDIF
7590 GOSUB *SYMBOL_STIME
7600 WAIT 2
7610 IF MOUSE(2,0) THEN 7370
7620 CD PLAY(CDTIMEM,CDTIMES,0)
7630 CONNECT(17,255)-(17,241)-(63,241),%14
7640 CONNECT(18,255)-(63,255)-(63,242),%13
7650 RETURN
7660 *CDFF
7670 CONNECT(65,255)-(65,241)-(111,241),%13
7680 CONNECT(66,255)-(111,255)-(111,242),%14
7690 IF PLAYCD=0 THEN 7970
7700 PLAYCD=1
7710 CDTIMEM=CDS%(2):CDTIMES=CDS%(3)
7720 IF NOT(CDTIMEM=CDF%(2) AND CDTIMES=CDF%(3)) THEN
7730 IF CDTIMES=59 THEN
7740 CDTIMEM=CDTIMEM+1:CDTIMES=0
7750 ELSE
7760 CDTIMES=CDTIMES+1
7770 ENDIF
7780 IF PLAYCDN>=CDF%(5) THEN 7810
7790 A1=VAL(LEFT$(CDSTIME$(PLAYCDN+1),2))
7800 A2=VAL(MID$(CDSTIME$(PLAYCDN+1),4,2))
7810 IF NOT(CDTIMEM=A1 AND CDTIMES=A2) OR PLAYCD=CDF%(5) THEN
7820 IF STIMES=59 THEN
7830 STIMEM=STIMEM+1:STIMES=0
7840 ELSE
7850 STIMES=STIMES+1
7860 ENDIF
7870 ELSE
7880 PLAYCDN=PLAYCDN+1:CDS%(5)=PLAYCDN
7890 STIMEM=0:STIMES=0
7900 GOSUB *SYMBOL_PLAYCD
7910 ENDIF
7920 ENDIF
7930 GOSUB *SYMBOL_STIME
7940 WAIT 2
7950 IF MOUSE(2,0) THEN 7720
7960 CD PLAY(CDTIMEM,CDTIMES,0)
7970 CONNECT(65,255)-(65,241)-(111,241),%14
7980 CONNECT(66,255)-(111,255)-(111,242),%13
7990 RETURN
8000 *IP_SET
8010 '設定項目 IP_WX,IP_WY,IP_MAX,IP_CL,IP_NAME$
8020 WHILE INKEY$<>"":WEND
8030 LINE(IP_WX,IP_WY)-(IP_WX+IP_MAX*8,IP_WY+15),PSET,%IP_CL,BF
8040 SYMBOL(IP_WX,IP_WY),IP_NAME$,1,1,7
8050 IP_X=0:IP_J=0:IP_L=LEN(IP_NAME$):IP_CK$=""
8060 LINE(IP_WX+IP_X*8,IP_WY)-(IP_WX+IP_X*8,IP_WY+15),PSET,2
8070 RETURN
8080 *IP_MAIN
8090 IP_BNAME$=IP_NAME$
8100 IP_A$=""
8110 IP_B$=INKEY$:IF IP_B$<>"" THEN IP_A$=IP_A$+IP_B$:GOTO 8110
8120 IF IP_A$="" THEN RETURN
8130 FOR IP_I=1 TO KLEN(IP_A$)
8140 IP_CK$=KMID$(IP_A$,IP_I,1)
8150 IP_ACK=ASC(IP_CK$)
8160 IF IP_ACK<&H20 OR IP_ACK=&H7F THEN 8230
8170 IF LEN(IP_NAME$+IP_CK$)>IP_MAX THEN 8230
8180 IP_BX=IP_X
8190 IP_NAME$=LEFT$(IP_NAME$,IP_X)+IP_CK$+RIGHT$(IP_NAME$,IP_L-IP_X)
8200 IP_X=IP_X+LEN(IP_CK$):IP_L=LEN(IP_NAME$):IP_J=IP_J+1
8210 LINE(IP_WX+IP_BX*8,IP_WY)-(IP_WX+IP_X*8,IP_WY+15),PSET,%IP_CL,BF
8220 SYMBOL(IP_WX+IP_BX*8,IP_WY),IP_CK$,1,1,7
8230 NEXT
8240 IF IP_NAME$=IP_BNAME$ THEN 8280
8250 LINE(IP_WX+IP_X*8,IP_WY)-(IP_WX+IP_L*8,IP_WY+15),PSET,%IP_CL,BF
8260 SYMBOL(IP_WX+IP_X*8,IP_WY),RIGHT$(IP_NAME$,IP_L-IP_X),1,1,7
8270 LINE(IP_WX+IP_X*8,IP_WY)-(IP_WX+IP_X*8,IP_WY+15),PSET,2
8280 IF IP_ACK=8 THEN GOSUB *IP_BS
8290 IF IP_ACK=&H7F THEN GOSUB *IP_DEL
8300 IF IP_ACK=&H1D THEN GOSUB *IP_LEFT
8310 IF IP_ACK=&H1C THEN GOSUB *IP_RIGHT
8320 RETURN
8330 *IP_END
8340 LINE(IP_WX+IP_X*8,IP_WY)-(IP_WX+IP_X*8,IP_WY+15),PSET,%IP_CL
8350 RETURN
8360 *IP_BS
8370 IF IP_X=<0 THEN RETURN
8380 IP_A$=KLEFT$(IP_NAME$,IP_J-1)
8390 IP_B$=KRIGHT$(IP_NAME$,KLEN(IP_NAME$)-IP_J)
8400 IP_NAME$=IP_A$+IP_B$
8410 IP_BL=IP_L
8420 IP_X=LEN(IP_A$):IP_L=LEN(IP_NAME$):IP_J=IP_J-1
8430 LINE(IP_WX+IP_X*8,IP_WY)-(IP_WX+IP_BL*8,IP_WY+15),PSET,%IP_CL,BF
8440 SYMBOL(IP_WX+IP_X*8,IP_WY),IP_B$,1,1,7
8450 LINE(IP_WX+IP_X*8,IP_WY)-(IP_WX+IP_X*8,IP_WY+15),PSET,2
8460 RETURN
8470 *IP_DEL
8480 IF IP_X>=IP_L THEN RETURN
8490 IP_A$=KLEFT$(IP_NAME$,IP_J)
8500 IP_B$=KRIGHT$(IP_NAME$,KLEN(IP_NAME$)-IP_J-1)
8510 IP_NAME$=IP_A$+IP_B$
8520 IP_BL=IP_L
8530 IP_L=LEN(IP_NAME$)
8540 LINE(IP_WX+IP_X*8,IP_WY)-(IP_WX+IP_BL*8,IP_WY+15),PSET,%IP_CL,BF
8550 SYMBOL(IP_WX+IP_X*8,IP_WY),IP_B$,1,1,7
8560 LINE(IP_WX+IP_X*8,IP_WY)-(IP_WX+IP_X*8,IP_WY+15),PSET,2
8570 RETURN
8580 *IP_LEFT
8590 IF IP_X=<0 THEN RETURN
8600 IP_J=IP_J-1
8610 IP_BX=IP_X
8620 IP_X=LEN(KLEFT$(IP_NAME$,IP_J))
8630 LINE(IP_WX+IP_BX*8,IP_WY)-(IP_WX+IP_BX*8,IP_WY+15),PSET,%IP_CL
8640 SYMBOL(IP_WX+IP_BX*8,IP_WY),KMID$(IP_NAME$,IP_J+2,1),1,1,7
8650 LINE(IP_WX+IP_X*8,IP_WY)-(IP_WX+IP_X*8,IP_WY+15),PSET,2
8660 RETURN
8670 *IP_RIGHT
8680 IF IP_X>=IP_L THEN RETURN
8690 IP_J=IP_J+1
8700 IP_BX=IP_X
8710 IP_X=LEN(KLEFT$(IP_NAME$,IP_J))
8720 LINE(IP_WX+IP_BX*8,IP_WY)-(IP_WX+IP_BX*8,IP_WY+15),PSET,%IP_CL
8730 SYMBOL(IP_WX+IP_BX*8,IP_WY),KMID$(IP_NAME$,IP_J,1),1,1,7
8740 LINE(IP_WX+IP_X*8,IP_WY)-(IP_WX+IP_X*8,IP_WY+15),PSET,2
8750 RETURN
8760 *E_TRAP
8770 CLOSE
8780 IF ERL=290 THEN PLAYCD=0:RESUME 380
8790 IF ERL=3870 THEN PLAYCD=0:RESUME 4210
8800 IF ERL=6730 THEN PLAYCD=0:RESUME 6790
8810 IF ERL=150 THEN RESUME 180
8820 IF ERL=6200 THEN RESUME NEXT
8830 IF ERL=6210 THEN RESUME 6240
8840 IF ERL=1240 THEN
8850 GET@A(128,128)-(512,352),PT3%
8860 LINE(128,192)-(512,289),PSET,7,BF,%1
8870 SYMBOL(185,232),"指定したファイルはありませんよ?",1,1,7
8880 LINE(456,256)-(504,280),PSET,%13,B
8890 CONNECT(457,279)-(457,257)-(503,257),%14
8900 CONNECT(458,279)-(503,279)-(503,258),%13
8910 SYMBOL(464,260),"確認",1,1,7
8920 WHILE MOUSE(2,0)=0:WEND
8930 MX=MOUSE(0):MY=MOUSE(1)
8940 IF MX>456 AND MX<504 AND MY>256 AND MY<280 THEN ELSE 8920
8950 CONNECT(457,279)-(457,257)-(503,257),%13
8960 CONNECT(458,279)-(503,279)-(503,258),%14
8970 WHILE MOUSE(2,0):WEND
8980 PUT@A(128,128)-(512,352),PT3%
8990 RESUME *MAIN
9000 ENDIF
9010 IF ERL=2580 OR ERL=2590 OR ERL=3660 OR ERL=3670 THEN
9020 GET@A(128,128)-(512,352),PT3%
9030 LINE(128,192)-(512,289),PSET,7,BF,%1
9040 SYMBOL(220,232),"メモリが足りません スミマセン",1,1,7
9050 GOTO 8880
9060 ENDIF
9070 IF ERL=5640 OR ERL=5630 THEN
9080 GOSUB *WINDOW
9090 IF ERR=64 AND ERL=5640 THEN SYMBOL(232,232),"上書きしていいですか?",1,1,7:GOTO 9110
9100 SYMBOL(180,232),"書き込みができませんよ? チェックを!",1,1,7
9110 M=0
9120 WHILE M=0
9130 M=-MOUSE(2,0)-MOUSE(2,1)*2
9140 WEND
9150 IF M=2 THEN PUT@A(128,128)-(512,352),PT3%:RESUME 5890
9160 GOSUB *W_CHECK_YN
9170 IF YN=1 THEN
9180 IF ERR=64 AND ERL=5640 THEN KILF=1
9190 PUT@A(128,128)-(512,352),PT3%:RESUME 5630
9200 ENDIF
9210 IF YN=2 THEN PUT@A(128,128)-(512,352),PT3%:RESUME 5890
9220 GOTO 9110
9230 ENDIF
9240 IF ERR=53 THEN RESUME NEXT
9250 SCREEN 0:CLS:PRINT"エラー行";ERL;" エラー番号";ERR
9260 MOUSE 5:END